<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			div{
				width: 200px;
				height: 30px;
				border-radius: 10px;
				border: 1px solid black;
				margin: 100px auto;
				/*background: linear-gradient(to right, green,green 20%, white 20%,white 100%)*/
			}
		</style>
	</head>
	<body>
		<div id="test"></div>
		<script src="http://cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
		<script src="vue.min.js"></script>
		<script type="text/javascript">
			new Vue({
				el:'#test',
				data:{
					pop:10
				},
				computed:{
					
				},
				mounted:function(){
					var pro = document.getElementById('test')					
					setInterval(function(){
						this.pop++
						pro.style.background = 'linear-gradient(to right, green,green ' + this.pop + '%, white ' + this.pop + '%,white 100%)'						
					}.bind(this),500)
				},
				methods:{
					
				}
			})
		</script>
	</body>
</html>
